With continuous deepening of research and development on wireless sensor network technologies, the technologies are widely applied to various fields due to their obvious advantages, and therefore, requirements on performance of various aspects of a wireless sensor network are increasingly higher, including stability, power consumption, delay, and the like of the wireless sensor network. At present, there are many researches on this aspect; however, researches on an aspect of backoff algorithms mainly focus on an improvement that is based on the Institute of Electrical and Electronics Engineers (IEEE) 802.11 standards. Although IEEE 802.15.4 may be used for some reference, specific analysis and researches still need to be performed according to a specific application scenario condition of a low-rate wireless personal area network.
In the Guobiao Recommended (GB/T) 15629.15-2010 standard, a timeslot-based carrier sense multiple access with collision avoidance (CSMA/CA) algorithm is used, of which a specific process is as follows.
1). A Medium Access Control (MAC) layer first initializes the number of backoffs (NB), a contention window (CW), a backoff exponent (BE), and locates an initial boundary of a backoff. If a battery life extension (BLE) subfield is 0, the BE is initialized to be a macMinBE; and if the BLE subfield is 1, the BE is initialized to be a min(2, macMinBE).
2). The MAC layer delays data transmission, enters a backoff state, and randomly selects several backoffs from 0−(2BE−1).
3). A physical layer (PHY) executes one clear channel assessment (CCA) at a backoff end boundary.
4). If the MAC layer learns that a channel is busy, the MAC layer adds 1 to values of the NB and the BE, ensures that the BE does not exceed the macMaxBE, and sets the CW to 2. If the value of the NB is less than or equal to a macMaxCSMABackoffs, the algorithm returns to step 2); and if the value of the NB is greater than the macMaxCSMABackoffs, the algorithm automatically ends, and returns a channel contention failure.
5). If the MAC layer learns that the channel is clear, the MAC layer needs to ensure that the contention window is 0 before transmitting data. To ensure this, a MAC sublayer first subtracts 1 from the CW, and determines whether the CW is 0. If the CW is not 0, the algorithm returns to step 3); and if the CW is 0, the MAC sublayer transmits a frame at an initial boundary of a next backoff stage.
In the standard, the CSMA/CA algorithm uses a binary exponential backoff algorithm (BEB). The backoff exponent BE is 3 to 5 by default in the standard, and a variation range is relatively small; however, optional backoff time doubles each time, a difference of randomly selected backoff time is relatively large between nodes, and the macMinBE is 3, so that selected backoff time is relatively large, which increases a backoff time threshold, causes data access to be too slow, and is bad for rapid data interaction.